const proxy = require("http-proxy-middleware");
// https://shadow.elemecdn.com/lib/city-list@0.0.3/city_list.json
module.exports = function (app) {
  app.use(proxy.createProxyMiddleware("/lib", {
    target: "https://h5.ele.me/",  // 代理 地址
    changeOrigin: true, // 改变 源
    pathRewrite: { '^/lib': '' }, // 取消前戳
    secure: false  // https
  }))
  app.use(proxy.createProxyMiddleware("/lib2", {
    target: "https://shadow.elemecdn.com/",  // 代理 地址
    changeOrigin: true, // 改变 源
    pathRewrite: { '^/lib2': '' }, // 取消前戳
    secure: false  // https
  }))
};